package com.goscom.app.deeset;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Welcome extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome);
		
		String strResult = getIntent().getStringExtra("result");
		if (strResult != null )
		{
			if (strResult.equals("") == false) {
				AlertDialog.Builder dialog = new AlertDialog.Builder(this);
				dialog.setTitle("Warning");
				dialog.setMessage(strResult + " can't upload. Connect to server is failed. Please try upload again!");
				dialog.setCancelable(false);
				dialog.setPositiveButton("Close", new DialogInterface.OnClickListener() {
					
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
					}
				});
				dialog.show();
			}
		}
	}

	public void Logout(View v) {
		startActivity(new Intent(Welcome.this, Login.class));
	}

	public void NewMer(View v) {
		startActivity(new Intent(Welcome.this, MerchandiserName.class));
	}

	public void ExistMer(View v) {
		startActivity(new Intent(Welcome.this, ExistingMerchandiser.class));
	}

}
